<div id="viewer-container"></div>
<div class="label-info">
  <div class="btn" onclick="anima(true)">模型炸开</div>
  <div class="btn" onclick="anima(false)">模型收缩</div>
</div>
<script>
  let model
  CTS.ready(() => {
    //初始化场景
    let viewer = new CTS.Viewer('viewer-container')
    viewer.camera.position.set(0, 70, -180) //设置相机位置
    //开始加载模型
    new CTS.ModelLoder(viewer).loadModelToScene('resources/model/scene.glb', _model => {
      model = _model
    })
  })
  function anima(isOpen) {
    if (isOpen) model.startBomb()
    else model.quitBomb()
  }
</script>
